Skip to content

Conversation

anupriya13
Copy link
Contributor

@anupriya13 anupriya13 commented Aug 8, 2025

Description

Type of Change

  • New feature (non-breaking change which adds functionality)

Why

What is the motivation for this change? Add a few sentences describing the context and overall goals of the pull request's commits.

Resolves #15027

What

What changes were made to the codebase to solve the bug, add the functionality, etc. that you specified above.

Adds a yes/no prompt in init-windows and if user wants new arch then will switch to that instead.

Screenshots

Add any relevant screen captures here from before or after your changes.

init-windows with No

image

init-windows with Yes

image

Testing

If you added tests that prove your changes are effective or that your feature works, add a few sentences here detailing the added test scenarios.

Optional: Describe the tests that you ran locally to verify your changes.

Tested locally

Recording.2025-08-14.181124.mp4

Other Cases:

1. old/uwp-cpp-app

image

2. old/uwp-cs-app

image

3. cpp-app

image

4. cpp-lib

image

5. --no-prompt

image

Changelog

Should this change be included in the release notes: yes

Add a brief summary of the change to use in the release notes for the next release.

… and interactive prompt for init-windows (#15029)

* Initial plan

* Initial plan: Update CLI prompt for architecture selections on old arch

Co-authored-by: anupriya13 <[email protected]>

* Implement interactive architecture prompt for old architecture templates

Co-authored-by: anupriya13 <[email protected]>

* Final implementation: Interactive architecture prompt with comprehensive testing

Co-authored-by: anupriya13 <[email protected]>

* Remove unintended changes from vnext/codegen directory

Co-authored-by: anupriya13 <[email protected]>

* Add prerelease change file for architecture prompt feature

Co-authored-by: anupriya13 <[email protected]>

* Replace interactive prompt with static warning for run-windows command

Co-authored-by: anupriya13 <[email protected]>

---------

Co-authored-by: copilot-swe-agent[bot] <[email protected]>
Co-authored-by: anupriya13 <[email protected]>
@anupriya13 anupriya13 requested a review from jonthysell August 8, 2025 08:27
@anupriya13 anupriya13 requested a review from Copilot August 8, 2025 08:55
Copilot

This comment was marked as outdated.

@anupriya13 anupriya13 marked this pull request as ready for review August 8, 2025 11:24
@anupriya13 anupriya13 requested a review from a team as a code owner August 8, 2025 11:24
@iamAbhi-916 iamAbhi-916 requested a review from Copilot August 8, 2025 12:36
Copilot

This comment was marked as outdated.

@anupriya13 anupriya13 closed this Aug 8, 2025
@anupriya13 anupriya13 reopened this Aug 11, 2025
@anupriya13 anupriya13 requested a review from Copilot August 11, 2025 03:50
Copilot

This comment was marked as outdated.

@acoates-ms
Copy link
Contributor

"⚠️ This project is using the React Native (for Windows) Old Architecture, which will eventually be deprecated"

I'm not sure that this is strong enough. -- It sounds like paper will no longer work in RN 0.82. -- We should probably say that using the old architecture will only work through RNW 0.81, after which it will no longer be supported.

Maybe something like:

"⚠️ This project is using the React Native (for Windows) Old Architecture. The old architecture will be removed in react-native-windows 0.82. It is strongly recommended to move to the new architecture as soon as possible."

@anupriya13 anupriya13 force-pushed the user/anuverma/cliUpdate branch from 40e03fc to 076d5dd Compare August 14, 2025 11:18
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR enhances the React Native Windows CLI to improve the developer experience when working with old architecture projects. It adds interactive prompts during project initialization and static warnings during project runs.

  • Adds an interactive yes/no prompt in init-windows that allows users to switch from old architecture to new architecture
  • Updates run-windows to show a more prominent static warning for old architecture projects
  • Includes a --no-prompt flag to skip interactive prompts for automated scenarios

Reviewed Changes

Copilot reviewed 8 out of 8 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
oldArchWarning.ts New utility for displaying consistent old architecture warnings
architecturePrompt.ts New utility for prompting users about architecture choice
initWindows.test.ts Test updates to validate the new --no-prompt option
architecturePrompt.test.ts New test file covering the architecture prompt functionality
runWindows.ts Updated to use the new warning utility instead of inline warning
initWindowsOptions.ts Added noPrompt option to the interface and command options
initWindows.ts Integrated the prompt logic and telemetry tracking for template changes
Change file Standard change file for versioning

@@ -0,0 +1,119 @@
/**
* Copyright (c) Microsoft Corporation.
* Licensed under the MIT License.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Disregard this review comment. The correct copyright that we use in all files is:

Copyright (c) Microsoft Corporation.
Licensed under the MIT License.

@anupriya13 anupriya13 enabled auto-merge (squash) August 19, 2025 05:44
Copy link
Contributor

@iamAbhi-916 iamAbhi-916 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@anupriya13 anupriya13 merged commit 48ba9d5 into main Aug 19, 2025
58 checks passed
@anupriya13 anupriya13 deleted the user/anuverma/cliUpdate branch August 19, 2025 06:51
anupriya13 added a commit to anupriya13/react-native-windows that referenced this pull request Aug 19, 2025
… and interactive prompt for init-windows (microsoft#15038)

* Update CLI to show static warning for old architecture in run-windows and interactive prompt for init-windows (microsoft#15029)

* Initial plan

* Initial plan: Update CLI prompt for architecture selections on old arch

Co-authored-by: anupriya13 <[email protected]>

* Implement interactive architecture prompt for old architecture templates

Co-authored-by: anupriya13 <[email protected]>

* Final implementation: Interactive architecture prompt with comprehensive testing

Co-authored-by: anupriya13 <[email protected]>

* Remove unintended changes from vnext/codegen directory

Co-authored-by: anupriya13 <[email protected]>

* Add prerelease change file for architecture prompt feature

Co-authored-by: anupriya13 <[email protected]>

* Replace interactive prompt with static warning for run-windows command

Co-authored-by: anupriya13 <[email protected]>

---------

Co-authored-by: copilot-swe-agent[bot] <[email protected]>
Co-authored-by: anupriya13 <[email protected]>

* Change files

* Remove incorrect change file

Co-Authored-By: Jon Thysell <[email protected]>

* Address issues

* add logs

* nit fixes

* prompt fix

* Update initWindowsOptions.ts

* Update initWindows.test.ts

* Resolve Comments

* Change files

---------

Co-authored-by: Copilot <[email protected]>
Co-authored-by: Jon Thysell <[email protected]>
anupriya13 added a commit that referenced this pull request Aug 22, 2025
… and interactive prompt for init-windows (#15038) (#15070)

* Update CLI to show static warning for old architecture in run-windows and interactive prompt for init-windows (#15029)

* Initial plan

* Initial plan: Update CLI prompt for architecture selections on old arch



* Implement interactive architecture prompt for old architecture templates



* Final implementation: Interactive architecture prompt with comprehensive testing



* Remove unintended changes from vnext/codegen directory



* Add prerelease change file for architecture prompt feature



* Replace interactive prompt with static warning for run-windows command



---------




* Change files

* Remove incorrect change file



* Address issues

* add logs

* nit fixes

* prompt fix

* Update initWindowsOptions.ts

* Update initWindows.test.ts

* Resolve Comments

* Change files

---------

Co-authored-by: Copilot <[email protected]>
Co-authored-by: Jon Thysell <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Update CLI Prompt for Architecture Selections on Old Arch
6 participants